VDA 5050 Connector
The VDA 5050 Connector connects to an MQTT broker and subscribes to the visualization topic. From these visualization messages, it extracts the agvPosition, converts it to an omlox Location object, and publishes it to the same broker via the omlox/json/location_updates/pub/{provider_id} topic. From there, the Location can be processed by the DeepHub.
Setup and Configuration
The VDA 5050 Connector is available through Docker Hub as a standalone Docker image: flowcate/deephub-connector:vda5050.
To start this connector alongside a DeepHub instance, the following configurations must be added to the docker-compose file used to start the DeepHub:
vda5050_connector:
image: flowcate/deephub-connector:vda5050
environment:
- MQTT_BROKER_HOST=mosquitto
- MQTT_BROKER_PORT=1883
- VDA5050_INTERFACE_NAME=vda5050
- VDA5050_MAJOR_VERSION=v2
- RUST_LOG=info
depends_on:
- mosquitto
networks:
- flowcate-net
mosquitto:
image: eclipse-mosquitto:2.0
entrypoint: "mosquitto"
command: ["-c", "/mosquitto-no-auth.conf"]
ports:
- "1883:1883"
networks:
- deephub-net
- flowcate-net
deephub:
image: flowcate/deephub:2.7.0
read_only: true
environment:
- DEEPHUB_MQTT_ADDRESS=mosquitto
- DEEPHUB_MQTT_PORT=1883
- ...
volumes:
- ./data/hub-data:/data
ports:
- "8081:8081"
depends_on:
mosquitto:
condition: service_started
networks:
- deephub-net
...
The relevant configuration parameters are:
| Variable | Description |
|---|---|
| MQTT_BROKER_HOST | The address of the MQTT broker. |
| MQTT_BROKER_PORT | The port of the MQTT broker. |
| VDA5050_INTERFACE_NAME | Name of the used interface. |
| VDA5050_MAJOR_VERSION | Major version number of VDA 5050. |
The connector expects the following topic structure: interfaceName/majorVersion/manufacturer/serialNumber/topic
Property Mapping
The omlox location updates are constructed based on the information contained in the VDA 5050 visualization message.
The connector therefore uses the following mapping:
| VDA 5050 | omlox |
|---|---|
| serialNumber | provider_id |
| mapId | source |
| AgvPosition x,y | position |
| timestamp | timestamp_generated |
The location updates are always interpreted as local coordinates.
This means that mapId MUST correspond to a valid id or foreign_id of a zone in the DeepHub.
The provider_type of the omlox location update will always be set to unknown.
Authentication
If the MQTT broker requires authentication, the following environment variables may be set for the VDA 5050 Connector:
| Variable | Expected Value Type |
|---|---|
| MQTT_BROKER_USER | string |
| MQTT_BROKER_PASSWORD | string |
| MQTT_TLS | bool |
| MQTT_CA_CERT | string |
| MQTT_VERIFY_PEER | bool |
Battery State and Load
To store data regarding the battery state or the load in a timescale database, a second connector has to be started. For this, the following environment variable needs to be set: DATABASE_URL=postgresql://user:pass@url:port/database
This connector subscribes to the state topic. From state messages, it extracts the batteryState and the loads, and writes them to the database with the following schema:
battery_state:
| Column Name | Value Type |
|---|---|
| serial_number | text |
| battery_charge | double precision |
| battery_voltage | double precision |
| battery_health | double precision |
| charging | boolean |
| reach | double precision |
| timestamp | timestampz |
loads:
| Column Name | Value Type |
|---|---|
| serial_number | text |
| is_loaded | boolean |
| data | jsonb |
| timestamp | timestampz |